package com.atguigu.tx.controller;

import com.atguigu.tx.service.BookService;
import com.atguigu.tx.service.CheckoutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * Date:2020/9/25
 * Author:ybc
 * Description:
 */
@Controller
public class BookController {

    @Autowired
    private BookService bookService;
    @Autowired
    private CheckoutService checkoutService;

    public void buyBook(){
        bookService.buyBook(1,1);
    }

    public void checkout(){
        checkoutService.checkout(1, new Integer[]{1,2});
    }

}
